#ifndef __REGION_CONFIG_H
#define __REGION_CONFIG_H

#include "typedefs.h"
#include <stdbool.h>

#ifdef REGION_USE_F
	#define REGION_PICK_CONTENT_NUM 4
#endif
#ifdef REGION_USE_Y
	#define REGION_PICK_CONTENT_NUM 3
#endif
#ifdef REGION_USE_S
	#define REGION_PICK_CONTENT_NUM 6
#endif
#define REGION_PICK_CONTENT_BIT_NUM (REGION_PICK_CONTENT_NUM*3)

#ifdef REGION_PICK
typedef struct{
	#ifdef REGION_USE_F
	uint16_t x1;
	uint16_t y1;
	uint16_t x2;
	uint16_t y2;
	#endif
	#ifdef REGION_USE_Y
	uint16_t x1;
	uint16_t y1;
	uint16_t r;
	#endif
	#ifdef REGION_USE_S
	uint16_t x1;
	uint16_t y1;
	uint16_t x2;
	uint16_t y2;
	uint16_t x3;
	uint16_t y3;
	#endif
}region_pick_t;

void Region_ConfigPick(region_pick_t* pt);
region_pick_t Region_ReadPick(void);
uint8_t Region_ReadPickContentNum(void);
uint8_t Region_ReadPickContentBitNum(void);
bool Region_CheckPick(uint16_t x,uint16_t y);
#ifdef REGION_USE_Y
object_pos_t Region_CircleGetPos(uint8_t num);
#endif
#endif

#ifdef REGION_PUT
#define REGION_PUT_MAX_NUM		5

typedef object_pos_t region_put_t;

void Region_ConfigPut(region_put_t* pt,uint8_t num);
region_put_t Region_ReadPut(uint8_t num);
region_put_t* Region_ReadPutAll(void);
void Region_DeletePut(uint8_t num);
void Region_ClearPutNum(void);
uint8_t Region_ReadPutNum(void);
#endif
bool Region_CheckPos(uint16_t x,uint16_t y);
void Region_Init(void);

#endif
